<template>
  <div>
    <div class="foot" :class="{ mobile: isMobile }">
      <h1>Peakedness's Blog</h1>
      <span class="btn-left btn">联系我</span>
      <span class="btn-right btn">关于我</span>
    </div>
    <!--返回顶部-->
    <button onclick="returnTop()" id="btnTop" title="返回顶部" class="to-top">
      ↑
    </button>

    <div class="info" :class="{ mobile: isMobile }">
      © 2020 Peakedness's Blog 网站地图|阿里云|浙ICP备15014366号-1|
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "index",
  computed: {
    ...mapGetters(["isMobile"])
  }
};
</script>

<style lang="less" scoped>
.foot {
  width: 100%;
  height: 250px;
  background-image: linear-gradient(45deg, #93a5cf 0%, #e4efe9 100%);
  position: relative;
  &.mobile {
    .btn-left {
      margin-left: -20vw;
    }
    .btn-right {
      margin-left: 10vw;
    }
    .btn:hover {
      background: #ffffff;
      border: none;
      color: #b7c6db;
    }
  }
  .btn {
    position: absolute;
    top: 130px;
    width: 100px;
    text-align: center;
    line-height: 50px;
    border-radius: 5px;
    color: #ffffff;
    background: transparent;
    border-color: #ffffff;
    border-style: solid;
  }
  .btn:hover {
    background: #ffffff;
    border: none;
    color: #b7c6db;
  }
  .btn-left {
    left: 40vw;
  }
  .btn-right {
    left: 53vw;
  }
  h1 {
    text-align: center;
    padding-top: 60px;
    color: #ffffff;
  }
}
.to-top {
  position: fixed;
  bottom: 0;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #3c4d5b;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  transform: translatey(-50px);
  transition: all 1s;
  opacity: 0;
  &.show {
    transform: translateY(-100px);
    opacity: 1;
  }
}
.info {
  text-align: center;
  height: 100px;
  line-height: 100px;
  color: #b7c6db;
  &.mobile {
    height: 50px;
    line-height: 50px;
    color: #b7c6db;
    font-size: 70%;
  }
}
</style>
